<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   
    <base href="<%=basePath%>">
    <title>My JSP 'upload.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body><br>&nbsp; 
   <br><a href="${pageContext.request.contextPath}/admin">返回管理</a>
   	<h1>上传管理 </h1>
	<hr>	<a href="${pageContext.request.contextPath}/admin/upload">上传附件</a>
<table width="755" height="79" border="1">
  <tr>
    <td width="87">名称</td>
    <td width="150">描述</td>
    <td width="293">引用路径</td>
    <td width="200">上传日期</td>
    <td width="60">大小</td>
    <td width="192">管理</td>
  </tr>
  <c:forEach items="${uploadItems}" var="item">
  <tr>
    <td>${item.name }</td>
    <td>${item.description }</td>
    <td><a href="${item.servicerPath }">${item.servicerPath }</a></td>
    <td>${item.uploadTime }</td>
    <td>1.2M</td>
    <td>
						<a href="#${catg.id }">编辑</a>&nbsp;&nbsp;
						
						 <a href="${pageContext.request.contextPath}/admin/upload_manager/${item.id }"  onclick="if (confirm('你确定要删除这个附件吗？')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f);f.name='categoryForm' ;f.method = 'POST'; f.action =this.href ;var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', 'method'); m.setAttribute('value', 'delete'); f.appendChild(m); f.submit(); };return false;"
						 >删除</a>
					</td>
  </tr>
  </c:forEach>
</table>

  </body>
</html>
